#include<func.h>
int main()
{
    pthread_mutexattr_t mutex_attr;
    pthread_mutexattr_init(&mutex_attr);
    pthread_mutexattr_settype(&mutex_attr,  PTHREAD_MUTEX_ERRORCHECK);
    pthread_mutex_t mutex;
    int ret=pthread_mutex_init(&mutex,&mutex_attr);
    THREAD_ERR_CHECK(ret,"pthread_mutex_init");
    pthread_mutex_lock(&mutex);
    printf("lock one success\n");
    ret=pthread_mutex_lock(&mutex);
    THREAD_ERR_CHECK(ret,"pthread_mutex_lock");
    return 0;
}